<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 赋予解构默认值
    const printAni2 = ({type,name,gender} = {}) =>{
      if(!type) return 'no type'
      if(!name) return 'no name'
      if(!gender) return 'no gender'
      return `${name} is ${gender} ${type}`
    }
    printAni2({type:'dog',name:'tom',gender:'male'})
    //asdfasfdsf
  </script>
</body>
</html>